[Security] Huawei, Jcenter, Jitpack repos clean up to reduce supply-chain attack surface #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR:
Applying
com.huawei.agconnect
plugin inhuawei
flavor only. Also limiting Huawei repo to fetch only Huawei related libraries.Huawei plugin is not open-source, hosted on a private repo (https://developer.huawei.com/repo) and developed by a Chinese company with a known history of cyberspy allegations (https://en.wikipedia.org/wiki/Criticism_of_Huawei).
This is an ideal recipe for a supply-chain attack where in one of routine CI builds a modified
agconnect
plugin can be automatically downloaded, inject code into the build which will be distributed with the apk release.Please consider dependency hashing to reduce the risk further (https://www.droidcon.com/2023/07/31/android-security-securing-your-gradle-builds-from-baddies/)
Dropped Jcenter repo for buildScript and project itself . The only dependency hosted there (https://github.com/google/flexbox-layout/releases) has been moved to
mavenCentral
. Version increase brought only package name change according to their github page. Jcenter was also compromised in 2018 supply chain attack (https://web.archive.org/web/20181214053140/http://blog.autsoft.hu/a-confusing-dependency/)Dropped Jitpack repo for buildScript . Project repo scope reduced to the only library hosted there (https://github.com/AbedElazizShe/LightCompressor).
This should also benefit build times a little due to reduce index of repos and one less build plugins for
gplay
flavor.